﻿#region Usings

using System.Xml.XPath;

#endregion

namespace Kazkommertsbank.Framework.Model.OrderStatus
{
    public class OrderStatusMerchant
    {
        private readonly string _xml;

        public OrderStatusMerchant(XPathNavigator nav)
        {
            _xml = nav.OuterXml;
            ID = nav.GetAttribute("id", "");
            XPathNavigator navigator = nav.SelectSingleNode("order");
            if(navigator != null)
                Order = new OrderStatusOrder(navigator);
        }

        public string ID { get; set; }
        public OrderStatusOrder Order { get; set; }

        public string ToXmlString()
        {
            return _xml;
        }
    }
}